package cn.fuxue.hrms.common.entity;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * @author 王文勇
 * @version 1.0
 * 出差申请实体类
 */
public class BusinessTripApplication {

    // 出差申请唯一标识
    private int id;
    // 申请出差的员工唯一标识，关联员工表
    private int employeeId;
    // 出差开始日期
    private Date startDate;
    // 出差结束日期
    private Date endDate;
    // 出差目的地
    private String destination;
    // 出差申请审批状态，PENDING 表示待审批，APPROVED 表示已批准，REJECTED 表示已拒绝
    private ApprovalStatus approvalStatus;
    // 审批日期
    private Timestamp approvalDate;
    // 审批人唯一标识，关联员工表
    private Integer approverId;
    // 创建该申请的用户唯一标识，关联用户表
    private int createId;
    // 申请创建时间
    private Timestamp createTime;
    // 最后修改该申请的用户唯一标识，关联用户表
    private Integer modifyId;
    // 申请最后修改时间
    private Timestamp modifyTime;
    // 标记该申请是否已删除，FALSE 表示未删除，TRUE 表示已删除
    private boolean isDeleted;
    // 申请更新时间
    private Timestamp updateTime;

    // 无参构造函数
    public BusinessTripApplication() {
    }

    // 全参构造函数
    public BusinessTripApplication(int id, int employeeId, Date startDate, Date endDate,
                                   String destination, ApprovalStatus approvalStatus,
                                   Timestamp approvalDate, Integer approverId, int createId,
                                   Timestamp createTime, Integer modifyId, Timestamp modifyTime,
                                   boolean isDeleted, Timestamp updateTime) {
        this.id = id;
        this.employeeId = employeeId;
        this.startDate = startDate;
        this.endDate = endDate;
        this.destination = destination;
        this.approvalStatus = approvalStatus;
        this.approvalDate = approvalDate;
        this.approverId = approverId;
        this.createId = createId;
        this.createTime = createTime;
        this.modifyId = modifyId;
        this.modifyTime = modifyTime;
        this.isDeleted = isDeleted;
        this.updateTime = updateTime;
    }

    // Getter 和 Setter 方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(int employeeId) {
        this.employeeId = employeeId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getDestination() {
        return destination;
    }

    public void setDestination(String destination) {
        this.destination = destination;
    }

    public ApprovalStatus getApprovalStatus() {
        return approvalStatus;
    }

    public void setApprovalStatus(ApprovalStatus approvalStatus) {
        this.approvalStatus = approvalStatus;
    }

    public Timestamp getApprovalDate() {
        return approvalDate;
    }

    public void setApprovalDate(Timestamp approvalDate) {
        this.approvalDate = approvalDate;
    }

    public Integer getApproverId() {
        return approverId;
    }

    public void setApproverId(Integer approverId) {
        this.approverId = approverId;
    }

    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public Integer getModifyId() {
        return modifyId;
    }

    public void setModifyId(Integer modifyId) {
        this.modifyId = modifyId;
    }

    public Timestamp getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Timestamp modifyTime) {
        this.modifyTime = modifyTime;
    }

    public boolean isDeleted() {
        return isDeleted;
    }

    public void setDeleted(boolean deleted) {
        isDeleted = deleted;
    }

    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    // 出差申请审批状态的枚举
    public enum ApprovalStatus {
        PENDING, APPROVED, REJECTED
    }

    @Override
    public String toString() {
        return "BusinessTripApplication{" +
                "id=" + id +
                ", employeeId=" + employeeId +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                ", destination='" + destination + '\'' +
                ", approvalStatus=" + approvalStatus +
                ", approvalDate=" + approvalDate +
                ", approverId=" + approverId +
                ", createId=" + createId +
                ", createTime=" + createTime +
                ", modifyId=" + modifyId +
                ", modifyTime=" + modifyTime +
                ", isDeleted=" + isDeleted +
                ", updateTime=" + updateTime +
                '}';
    }
}
